package com.blog1.pojo.request;


import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class LoginRequest {
    @NotNull(message = "用户名不能为空")
    @Length(max = 20,min = 1,message = "用户名长度在1-20之间")
    private String username;
    @NotNull(message = "密码不能为空")
    @Length(min = 3,message = "密码长度不能小于5")
    private String password;
}
